<?php defined( '_JEXEC') or die; ?>
<div class="subhead">	
    <input type="hidden" name="view" value="volunteerdetail" />
	<p>
        <h3>
            Username: <?php echo JRequest::getVar('volunteer') ;?><br />
			Files uploaded: <?php echo sizeof($this->results); ?>
        </h3>
        <strong>
        </strong>
    </p>
    <table border="0" cellspacing="0">
            <?php 
				$cnt = 0;
				foreach($this->results as $file) :
					$cnt++;
				?>
                <tr class="<?php if($cnt % 2 == 0) echo "row0"; else echo "row1"; ?>">
                    <td>
                        <p>
							<a href="<?php echo JRoute::_('index.php?option=com_volunteer&view=filedetail&fileid=' . $file->id); ?>"><?php echo $file->name; ?></a>
                                <br/>
                                <?php echo substr($file->description, 0, 120) . '...'; ?>
                        </p>
                    </td>
                    <td width="18%">
                        <a href="<?php echo JRoute::_('index.php?option=com_volunteer&view=filedetail&fileid=' . $file->id); ?>">View</a>
                        &nbsp;
                        <a href="<?php echo JRoute::_('index.php?option=com_volunteer&view=editfile&fileid=' . $file->id); ?>">Edit</a>
                        &nbsp;
                        <a href="<?php echo JRoute::_('index.php?option=com_volunteer&task=deletefile&fileid=' . $file->id); ?>"
                        onclick="javascript: return confirm('Delete this file?');">Delete</a>
                    </td>
                </tr>
                <?php endforeach; ?>
        </table>
</div>